using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Simple.Entity.Models.Mapping
{
    public class Sys_RoleMap : EntityTypeConfiguration<Sys_Role>
    {
        public Sys_RoleMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.RoleName)
                .HasMaxLength(50);

            this.Property(t => t.CreateUser)
                .HasMaxLength(50);

            this.Property(t => t.ModifyUser)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Sys_Role");
        }
    }
}
